#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic

%:
	dh $@ --buildsystem=cmake

# Option -DUSE_FORCE_CXX14:BOOL=ON sets CMAKE_CXX_STANDARD
# to 14 to get rid of ITK-4.12 dev-package VNL warnings
# (Debian 10, cmake-3.13.4)
CMAKEFLAGS = -DCMAKE_SKIP_RPATH:BOOL=ON \
 -DUSE_FORCE_CXX14:BOOL=ON \
 -DMDCM_USE_SYSTEM_UUID:BOOL=ON \
 -DMDCM_USE_SYSTEM_ZLIB:BOOL=ON \
 -DMDCM_USE_SYSTEM_OPENJPEG:BOOL=ON \
 -DMDCM_USE_SYSTEM_CHARLS:BOOL=ON

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKEFLAGS)

override_dh_auto_test:
	echo "No tests for this package"

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp
